<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sound</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="edit68k.css" rel="stylesheet" type="text/css">
</head>

<body class="text">
<p class="heading">Sim68K Sound<hr noshade></p>
<p></p>
<p>TRAP #15 is used for I/O. &nbsp;Put the task number in D0.</p>
&nbsp;<b>Task </b>
<table border="1" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="697">
  <tr>
    <td width="6%" class="text">
	<p><b>&nbsp;70</b></td>
    <td width="94%" class="text">
	<p> 
	&nbsp;Play the WAV file using the standard 
	player.<br>
&nbsp;Only one sound may be played at a time.<br>
		&nbsp;&nbsp;&nbsp; Pre:&nbsp;&nbsp; (A1) null terminated path address. Invalid file names are ignored.
        <br>
		&nbsp;&nbsp;&nbsp; Post: D0.W = 0 if player is busy, sound is not played.<br>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D0.W = non zero if sound played.</td>
  </tr>
  <tr>
    <td width="6%" class="text">
	<p><b>&nbsp;71</b></td>
    <td width="94%" class="text">
	<p>&nbsp;Load a WAV file into sound memory (not 68000 memory).<br>
&nbsp;&nbsp;&nbsp; Pre: (A1) null terminated path address. Invalid file names are ignored.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D1.B reference number to use for sound 0-255.<br>
&nbsp;&nbsp;&nbsp; A maximum of 256 sounds may be loaded at any one time.<br>
&nbsp;&nbsp;&nbsp; Reusing a reference number will replace the current sound.</td>
  </tr>
  <tr>
    <td width="6%" class="text">
	<p><b>&nbsp;72</b></td>
    <td width="94%" class="text">
	<p> 
	&nbsp;Play sound from sound memory loaded with 
	task 71 using standard player.<br>
&nbsp;Only one sound may be played at a time.<br>
&nbsp;&nbsp;&nbsp; Pre: D1.B must contain sound reference number used in task 71.
        <br>
		&nbsp;&nbsp;&nbsp; Post: D0.W = 0 if player is busy, sound is not played.<br>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D0.W = non zero if sound played.</td>
  </tr>
	<tr>
    <td width="6%" class="text">
	<p><b>&nbsp;73</b></td>
    <td width="94%" class="text">
	<p> 
	&nbsp;Play the WAV file using DirectX player, if 
	available.<br>
&nbsp;Multiple sounds may be played at the same time.<br>
		&nbsp;&nbsp;&nbsp; Pre:&nbsp;&nbsp; (A1) null terminated path address. Invalid file names are ignored.
        <br>
		&nbsp;&nbsp;&nbsp; Post: D0.W = 0 if DirectX 
		player not available, sound is not played.<br>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D0.W = non zero if sound played.</td>
  </tr>
	<tr>
    <td width="6%" class="text">
	<p><b>&nbsp;74</b></td>
    <td width="94%" class="text">
	<p>&nbsp;Load a WAV file into 
	DirectX sound memory (not 68000 memory).<br>
&nbsp;A maximum of 256 sounds may be loaded at any one time.<br>
&nbsp;Reusing a reference number will replace the current sound.<br>
&nbsp;&nbsp;&nbsp; Pre: (A1) null terminated path address. Invalid file names are ignored.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D1.B reference number to use for sound 0-255.<br>
	&nbsp;&nbsp;&nbsp; Post: D0.W = 0 if DirectX player not 
	available.<br>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	D0.W = non zero if sound loaded.</td>
  </tr>
	<tr>
    <td width="6%" class="text">
	<b>&nbsp;75</b></td>
    <td width="94%" class="text">
	&nbsp;Play sound from DirectX sound memory loaded with 
	task 74.<br>
&nbsp;&nbsp;&nbsp; Pre: D1.B must contain sound reference number used in task 74.
        <br>
		&nbsp;&nbsp;&nbsp; Post: D0.W = 0 if DirectX 
		player not available, sound is not played.<br>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D0.W = non zero if sound played.</td>
  	</tr>
	<tr>
    <td width="6%" class="text">
	<b>&nbsp;76</b></td>
    <td width="94%" class="text">
	&nbsp;Control Standard player<br>
&nbsp;Sounds must be in memory loaded with task 71.<br>
&nbsp;Only one sound may be played at a time.<br>
&nbsp;&nbsp;&nbsp; Pre: D1.B contains sound reference number used in task 71.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D2.L = 0, play 
	sound once (this is the same as task 72)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D2.L = 1, play 
	sound in loop, returns error if sound currently playing.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D2.L = 2, stop D1.B 
	referenced sound, returns error on bad reference number<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D2.L = 3, stop all 
	sounds, returns success (D1.B ignored)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D2.L = other values 
	reserved
        <br>
		&nbsp;&nbsp;&nbsp; Post: D0.W = 0 on error.<br>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	D0.W = non zero on success.</td>
  	</tr>
	<tr>
    <td width="6%" class="text">
	<b>&nbsp;77</b></td>
    <td width="94%" class="text">
	&nbsp;Control DirectX player, if available<br>
&nbsp;Sounds must be in DirectX memory loaded with task 74.<br>
&nbsp;Multiple sounds may be played at the same time.<br>
&nbsp;&nbsp;&nbsp; Pre: D1.B contains sound reference number used in task 74.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D2.L = 0, play 
	sound once (this is the same as task 75)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D2.L = 1, play 
	sound in loop. The same sound may be played multiple times.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D2.L = 2, stop D1.B 
	referenced sound, returns error on bad reference number<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D2.L = 3, stop all 
	sounds (D1.B ignored)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D2.L = other values 
	reserved
        <br>
		&nbsp;&nbsp;&nbsp; Post: D0.W = 0 if DirectX player not available.<br>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	D0.W = non zero on success.</td>
  		</tr>
</table>
</body>
</html>
